package composite.general;

/**
 * @Author：LJ
 * @Description：抽象组件
 * @Date: 2017/12/1
 * @Modified By:
 */
public abstract class Component {
    //父节点
    private Composite parent;

    //设置父节点
    public void setParent(Composite parent) {
        this.parent = parent;
    }

    //获取父节点
    public Composite getParent() {
        return parent;
    }

    //部分和整体都具有的
    public void doSomething() {

    }
}
